package org.jeecg.modules.sms.sms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.sms.sms.entity.CsSmsCzjl;

/**
 * @Description: 短信充值记录表
 * @Author: jeecg-boot
 * @Date:   2023-11-08
 * @Version: V1.0
 */
public interface CsSmsCzjlMapper extends BaseMapper<CsSmsCzjl> {
    /**
     * 取租户剩余短信条数
     * @param tenantId
     * @return
     */
    @Select({"select  IFNULL(sum(t.syts),0)syts from cs_sms_czjl  t where t.tenant_id = #{tenantId} and t.yxzt = '1'"})
    public int getSmsYe(String tenantId);
}
